package bean;

/**
 * LogTagId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class LogTagId implements java.io.Serializable {

	// Fields

	private Travelogue travelogue;
	private User user;

	// Constructors

	/** default constructor */
	public LogTagId() {
	}

	/** full constructor */
	public LogTagId(Travelogue travelogue, User user) {
		this.travelogue = travelogue;
		this.user = user;
	}

	// Property accessors

	public Travelogue getTravelogue() {
		return this.travelogue;
	}

	public void setTravelogue(Travelogue travelogue) {
		this.travelogue = travelogue;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof LogTagId))
			return false;
		LogTagId castOther = (LogTagId) other;

		return ((this.getTravelogue() == castOther.getTravelogue()) || (this
				.getTravelogue() != null
				&& castOther.getTravelogue() != null && this.getTravelogue()
				.equals(castOther.getTravelogue())))
				&& ((this.getUser() == castOther.getUser()) || (this.getUser() != null
						&& castOther.getUser() != null && this.getUser()
						.equals(castOther.getUser())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getTravelogue() == null ? 0 : this.getTravelogue()
						.hashCode());
		result = 37 * result
				+ (getUser() == null ? 0 : this.getUser().hashCode());
		return result;
	}

}